<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:91:"/www/wwwroot/crm.liunuo.net/public/../application/user/view/customer/add_track_mobile.phtml";i:1552999926;s:67:"/www/wwwroot/crm.liunuo.net/application/user/view/base_mobile.phtml";i:1552999924;}*/ ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title><?php echo config('website.site_name')?></title>
<link rel="stylesheet" type="text/css" href="/static/hui/css/hui.css" />
<style>.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}</style>

</head>
<body>

<header class="hui-header">
    <div id="hui-back"></div>
    <h1>编辑跟踪记录</h1>
</header>
<div class="hui-wrap">
    <form action="<?php echo request()->url(); ?>" class="hui-form" method="post">
        <?php if(is_array($config) || $config instanceof \think\Collection || $config instanceof \think\Paginator): if( count($config)==0 ) : echo "" ;else: foreach($config as $key=>$config): ?>
        <div class="hui-form-items">
            <div class="hui-form-items-title"><?php echo $config['title']; ?></div>
            <?php if($config['type'] == 'input'): ?>
            <input type="text" name="<?php echo $config['name']; ?>" value="<?php if(isset($data['jdata'][$config['name']])): ?><?php echo $data['jdata'][$config['name']]; else: ?><?php echo (isset($config['value']) && ($config['value'] !== '')?$config['value']:''); endif; ?>" autocomplete="off" class="hui-input hui-input-clear">
            <?php endif; if($config['type'] == 'textarea'): ?>
            <div class="hui-form-textarea">
                <textarea name="<?php echo $config['name']; ?>" placeholder="请输入<?php echo $config['title']; ?>"><?php if(isset($data['jdata'][$config['name']])): ?><?php echo $data['jdata'][$config['name']]; else: ?><?php echo (isset($config['value']) && ($config['value'] !== '')?$config['value']:''); endif; ?></textarea>
            </div>
            <?php endif; if($config['type'] == 'select'): if($config['is_sys'] == '1'): ?>
            <div class="hui-form-select">
                <select name="<?php echo $config['name']; ?>">
                    <?php $_5ca4da10e368e=parse_attr($config['options']); if(is_array($_5ca4da10e368e) || $_5ca4da10e368e instanceof \think\Collection || $_5ca4da10e368e instanceof \think\Paginator): if( count($_5ca4da10e368e)==0 ) : echo "" ;else: foreach($_5ca4da10e368e as $i=>$j): ?>
                    <option value="<?php echo $i; ?>" <?php if(isset($data[$config['name']]) == $i): ?>selected="selected"<?php endif; ?>><?php echo $j; ?></option>
                    <?php endforeach; endif; else: echo "" ;endif; ?>
                </select>
            </div>
            <?php else: ?>
            <div class="hui-form-select">
                <select name="<?php echo $config['name']; ?>">
                    <?php $_5ca4da10e3637=parse_attr($config['options']); if(is_array($_5ca4da10e3637) || $_5ca4da10e3637 instanceof \think\Collection || $_5ca4da10e3637 instanceof \think\Paginator): if( count($_5ca4da10e3637)==0 ) : echo "" ;else: foreach($_5ca4da10e3637 as $i=>$j): ?>
                    <option value="<?php echo $i; ?>" <?php if(isset($data['jdata'][$config['name']]) == $i): ?>selected="selected"<?php endif; ?>><?php echo $j; ?></option>
                    <?php endforeach; endif; else: echo "" ;endif; ?>
                </select>
            </div>
            <?php endif; endif; if($config['type'] == 'radio'): $_5ca4da10e35ae=parse_attr($config['options']); if(is_array($_5ca4da10e35ae) || $_5ca4da10e35ae instanceof \think\Collection || $_5ca4da10e35ae instanceof \think\Paginator): if( count($_5ca4da10e35ae)==0 ) : echo "" ;else: foreach($_5ca4da10e35ae as $i=>$j): ?>
            <div class="hui-form-radios" style="line-height:38px;">
                <input type="radio" name="<?php echo $config['name']; ?>" value="<?php echo $i; ?>" title="<?php echo $j; ?>" <?php if(isset($data['jdata'][$config['name']]) == $i): ?>checked="checked"<?php endif; ?>>
            </div>
            <?php endforeach; endif; else: echo "" ;endif; endif; if($config['type'] == 'image'): ?>
            <input type="text" name="<?php echo $config['name']; ?>" value="<?php if(isset($data['jdata'][$config['name']])): ?><?php echo $data['jdata'][$config['name']]; else: ?><?php echo (isset($config['value']) && ($config['value'] !== '')?$config['value']:''); endif; ?>" autocomplete="off" placeholder="请上传<?php echo $config['title']; ?>" class="hui-input">
            <button type="button" class="hui-btn hui-btn-primary hui-btn-position ajax-images"><i class="fa fa-file-image-o"></i> 选择图片</button>
            <?php endif; if($config['is_sys'] == '1'): ?>
            <div class="hui-form-mid hui-word-aux"><a class="hui-button hui-button-small hui-fl" href="<?php echo url('user/config/index'); ?>">设置参数值</a></div>
            <?php endif; ?>
        </div>
        <?php endforeach; endif; else: echo "" ;endif; ?>
        <div class="hui-form-items">
            <div class="hui-form-items-title">备注</div>
            <div class="hui-form-textarea">
                <textarea name="remark" class="layui-textarea"><?php echo (isset($data['remark']) && ($data['remark'] !== '')?$data['remark']:''); ?></textarea>
            </div>
        </div>
        <hr>
        <div class="hui-form-items">
            <div class="hui-form-items-title">客户信息</div>
            <input type="checkbox" name="update_customer" id="c1" onchange="showCheckRes(this);" /><label for="c1">同步修改客户基本信息</label>
        </div>
        <div id="myid">
            <?php if(is_array($config_customer) || $config_customer instanceof \think\Collection || $config_customer instanceof \think\Paginator): if( count($config_customer)==0 ) : echo "" ;else: foreach($config_customer as $key=>$config): ?>
            <div class="hui-form-items">
                <div class="hui-form-items-title"><?php echo $config['title']; ?></div>
                <div class="hui-form-select">
                    <?php if($config['type'] == 'select'): ?>
                    <select name="customer[<?php echo $config['name']; ?>]">
                        <?php $_5ca4da10e34d4=parse_attr($config['options']); if(is_array($_5ca4da10e34d4) || $_5ca4da10e34d4 instanceof \think\Collection || $_5ca4da10e34d4 instanceof \think\Paginator): if( count($_5ca4da10e34d4)==0 ) : echo "" ;else: foreach($_5ca4da10e34d4 as $i=>$j): ?>
                        <option value="<?php echo $i; ?>" <?php if($customer[$config['name']] == $i): ?>selected="selected"<?php endif; ?>><?php echo $j; ?></option>
                        <?php endforeach; endif; else: echo "" ;endif; ?>
                    </select>
                    <?php endif; ?>
                </div>
            </div>
            <?php endforeach; endif; else: echo "" ;endif; ?>
        </div>
        <div style="padding:15px 8px;">
            <button class="hui-button hui-button-large hui-primary" lay-filter="*" lay-submit="">保存</button>
        </div>
    </form>
</div>

<div class="hui-slide-menu">
    <ul>
        <?php if(is_array($navbar) || $navbar instanceof \think\Collection || $navbar instanceof \think\Paginator): if( count($navbar)==0 ) : echo "" ;else: foreach($navbar as $key=>$v): if($v['id']=='1'): if(is_array($v['children']) || $v['children'] instanceof \think\Collection || $v['children'] instanceof \think\Paginator): if( count($v['children'])==0 ) : echo "" ;else: foreach($v['children'] as $key=>$n1): ?>
                    <li><a href="javascript:hui.open('<?php echo \think\Request::instance()->root(true); ?>/<?php echo $n1['url']; ?>');"><?php echo $n1['name']; ?></a></li>
                <?php endforeach; endif; else: echo "" ;endif; endif; endforeach; endif; else: echo "" ;endif; ?>
        <li><a href="javascript:hui.open('<?php echo url('user/index/logout'); ?>');">退出账户</a></li>
        <li style="padding-top:30px;">
            <button type="button" class="hui-button hui-button-large" onclick="hui.closeSlideMenu();">关闭菜单</button>
        </li>
    </ul>
</div>
<div id="hui-footer">
    <a href="javascript:hui.open('/user/');" id="nav-home">
        <div class="hui-footer-icons hui-icons-home"></div>
        <div class="hui-footer-text">首页</div>
    </a>
    <a href="javascript:hui.open('/user/customer/track');" id="nav-news">
        <div class="hui-footer-icons hui-icons-news"></div>
        <div class="hui-footer-text">跟踪</div>
    </a>
    <div style="width:20%; text-align:center;" class="hui-fl">
        <img src="/static/hui/img/logo_footer.png" height="44" onclick="hui.open('/user/customer/');" />
    </div>
    <a href="javascript:hui.open('/user/customer/remind');" id="nav-forum">
        <div class="hui-footer-icons hui-icons-forum"></div>
        <div class="hui-footer-text">提醒</div>
    </a>
    <a href="javascript:hui.showSlideMenu();" id="nav-my" id="hui-header-menu" onclick="hui.showSlideMenu();">
        <div class="hui-footer-icons hui-icons-my"></div>
        <div class="hui-footer-text">我的</div>
    </a>
</div>
<script src="/static/hui/js/hui.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
hui.slideMenu();
//hui('#nav-my').pointMsg();
//hui('#nav-news').pointMsg('hot', null, null, null, '1px');
<?php $remind_sum= today_remind_sum();?>
hui('#nav-forum').pointMsg(<?php echo $remind_sum['count']; ?>);
</script>
<script src="/static/libs/layui/layui.all.js"></script>
<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/layui.base_mobile.js"></script>

<script type="text/javascript">
    $("#myid").hide();
    function showCheckRes(_selfBtn){
        var vals = new Array();
        hui(_selfBtn).parent().find('input').each(function(cObj){
            if(cObj.checked){
                vals.push(cObj.value);
            }
        });
        //console.log(vals);
        if(vals=='on'){
            $("#myid").show();
        }else{
            $("#myid").hide();
        }
    }
    
</script>

</body>
</html>